<?php
class Shop_kardex_model extends CI_Model {

    private $_tabla = 'shop_kardex';
           
    public function addKardexShop($data)
    {
        $this->db->insert($this->_tabla, $data);
    }
    
	public function findByShopId($shop_id){
        $this->db->select();
        $this->db->where('shop_id', $shop_id);
        $query = $this->db->get($this->_tabla);
        $rs = $query->result();
		return $rs;
    }
	
	public function deleteAll($shop_id){
		$this->db->query("DELETE FROM shop_kardex WHERE shop_id='".$shop_id."'");
	}
            
}